{% extends "home/home.html" %}
{% load i18n %}

{% block head_title%}Blog Avicaz{% endblock %}

{% block stylesheet %}
<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}css/article.css"/>
{% endblock %}

{% block content %}
<div class="row content-blog">
    <div class="span8">
        <div class="blog-post">
	        <img src="{{MEDIA_URL}}{{Post.image}}" alt="Image" height="372" width="700">
			    <h3><a>{{Post.title}}</a></h3>
				    <div class="post-detail">
					    <b>Posted:</b> {{Post.publish_date}} &nbsp;		
		<!-- 			<b>Tags:</b>&nbsp; <a href="#">Standard</a>  -->
						&nbsp;&nbsp;&nbsp;
						<b>Comments:</b>&nbsp;<a href="#">{{Post.comments_count}}</a>	
					</div>
			<div class="text-blog">
			    <p> {{Post.body}}</p>		
		    </div>
	    </div>
	</div>	 
</div>   
			    		    
<div class="row">
    <div class="span8">
    
<!------------------------------  LEAVE COMMENT  -------------------------------->
         <div class="respond">	   
		    <h3>Deja un Comentario</h3>
			   
			    <form enctype="multipart/form-data" method="POST">{% csrf_token %}
			            <br>				    
						{{ form.text }}
						 <br></div>
				{%if user.is_authenticated %}
					<p id="post-comment">
                         <input type="submit" class="button" value="Dejar Comentario">
                    </p>
                {% else %}
                	<p id="post-comment">
                         Lo sentimos, debe estar logueado para dejar un comentario.
                    </p>
                {% endif %}
                </form>
		
<!---------------------- COMMENTS  ---------------------------------------------->
	    <div class="comments">
		    <h3> {{Post.comments_count}} Comentarios</h3>
		    {% for comment in Comments %}
		    
		    <div class="comments-content row">
			        <div class="avatar span1"><img alt="" src=""></div>	
			    
				    <div class="comments-details span7">
				        <div class="comment-author">
					        <a href="#">{{comment.author}}</a>	
					    </div>
				        <div class="comment-meta">{{comment.created}} -  
				            <a class="comment-reply-link" href="">Responder</a>
				        </div>	
					    <div class="comment-text">
						    <p>{{comment.text}}</p>
						</div>
					</div>
			</div>
			{% endfor %}			
	    </div>
		
		
    </div>
	<div class="span4"></div>
</div>

{% endblock %}